package com.jfinal.ext.validator;


import com.hz.foodstalls.model.base.BaseWxUser;
import com.jfinal.core.Controller;
import com.jfinal.ext.kit.excel.Rule;
import com.jfinal.validate.Validator;

/**
 * @author fupan
 * @description activiti验证器
 * @create 2017-08-21 10:42
 **/
public class ActivitiValidator extends Validator {


    @Override
    protected void validate(Controller c) {
        validateRequiredString("name","nameMsg","请输入name");
        validateRequiredString("key","keyMsg","请输入key");
    }

    @Override
    protected void handleError(Controller c) {
        c.keepPara("name");
        c.keepPara("key");
        c.render("/WEB-INF/views/workflow/add.html");
    }
}
